//
//  WTFDSearchView.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/4/18.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "WTFDSearchView.h"

@implementation WTFDSearchView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame{
    if ([super initWithFrame:frame]) {
        [self initSubView];
    }
    return self;
}
- (void)initSubView{
    [self addSubview:self.searchFile];
    [_searchFile mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@20);
        make.right.equalTo(@0).offset(-20);
        make.centerY.equalTo(self.mas_centerY);
        make.height.equalTo(@30);
    }];
    
    self.searchFile.block = ^(NSString * _Nonnull keyStr) {
        
    };
    
}
- (LWQSearchView *)searchFile{
    if (!_searchFile) {
        LWQSearchView *tf = [[LWQSearchView alloc]initWithFrame:CGRectMake(self.frame.size.width/2-130, 5, 260, 30) initWithType:0 andImageName:@"search_buke"];
        tf.backgroundColor = [UIColorChange colorwithHexString:@"#EEEEEE"];
        tf.layer.cornerRadius = 15;
        _searchFile = tf;
    }
    return _searchFile;
}
//- (UIButton *)confirmButton{
//    if (!_confirmButton) {
//        UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
//        [button setTitle:@"管理分组" forState:UIControlStateNormal];
//        button.titleLabel.font = [UIFont systemFontOfSize:16];
//        [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
//        button.layer.cornerRadius = 5;
//        button.layer.masksToBounds = YES;
//        [button setBackgroundImage:[UIImage imageWithColor:SELECTEDCOLOR forSize:CGSizeMake(200, 200)] forState:UIControlStateNormal];
//        [button addTarget:self action:@selector(confirm:) forControlEvents:UIControlEventTouchUpInside];
//        _confirmButton = button;
//    }
//    return _confirmButton;
//}
//- (void)confirm:(UIButton *)sender{
//    
//}
@end
